package com.lifo.utils.queue;

import com.lifo.good.bean.model.HfGoodDescription;
import com.lifo.good.service.SearchHfGoodDescriptionService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * Created by Administrator on 2018/5/17 0017.
 */
public class HuiFvQueue<T>  {

    private static volatile HuiFvQueue huiFvQueue = null;
    public final ArrayBlockingQueue<T> arrayBlockingQueue = new ArrayBlockingQueue<T>(1000);

    /**
     * 单例的双重校验锁机制 begin
     */
    public static synchronized HuiFvQueue newInstance() {
        if (huiFvQueue == null) {
            synchronized (HuiFvQueue.class) {
                if (null == null) {
                    huiFvQueue = new HuiFvQueue();
                }
            }
        }
        return huiFvQueue;
    }


}
